package org.study.neo4j.boot.model;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.neo4j.core.schema.*;

import java.util.List;

/**
 * 电影实体类
 *
 * @author doveylovey
 * @version v1.0.0
 * @email 1135782208@qq.com
 * @date 2025年04月14日
 */
@Data
@NoArgsConstructor
@Node("Movie")
public class Movie {
    @Id
    private String title;

    @Property("description")
    private String description;

    @Relationship(type = "ACTED_IN", direction = Relationship.Direction.OUTGOING)
    private List<MovieActorRelationship> movieActorRelationshipList;

    @Relationship(type = "DIRECTED", direction = Relationship.Direction.INCOMING)
    private List<Actor> directorList;

    public Movie(String title, String description) {
        this.title = title;
        this.description = description;
    }
}
